home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.7 KB | 57 lines | [TEXT/GEOL] |
- Item 1356186 21-Jan-88 15:44
-
- From: ROSENSTEIN1 Rosenstein, Larry
-
- To: MAGILL1 Magill, Jon
-
- cc: MACAPP$ MacApp Interest List
-
- Sub: re Multiple-Undos revisited
-
- I recommend that people lookup the paper entitled "US&R: A New Framework for
- Redoing" by Jeffery Scott Vitter of Brown University. It was published in IEEE
- Software in October 1984. This describes a totally flexible scheme for
- handling undo.
-
- He proposes something that no one has mentioned -- the ability to skip an
- operation that has been previously done. For example, suppose you decided that
- the 3rd operation you did was wrong. You could undo 3 times, skip once, and
- then redo twice to fix the problem. (His proposal is event moe powerful than
- this; this is a very much simplified description of the paper.)
-
- Implementing the ability to save multiple command objects and undoing or
- redoing them in the original order is not terribly difficult. It requires
- extra space to store the command objects and the data they require. (This can
- be significant; in DrawShapes, each shape would need 1 wasSelected bit per undo
- level you supported. In MacPaint, each level of undo requires 50K.) In this
- case, the UI is clear; you need an undo command that goes backwards and a
- separate redo command that goes forwards.
-
- Allowing the user to skip around, however, is more complicated because some
- commands depend on one another. For example, the user might: (1) create a
- shape, (2) changes its pattern, and (3) move it. Clearly, (2) & (3) depend on
- (1) taking place, but are otherwise independent.
-
- In the example given previously, the Undo Move command is only valid while the
- shapes involved are still around. If the user deletes them, then undoing the
- move also has to undo the delete. Keeping track of the dependencies could get
- complicated.
-
- I think implementing an undo command for each tool would be confusing. A
- possibility is to keep undo the way it is, but allow have each tool identify
- the last shape drawn with it, using a separate command. That way the user can
- delete, move, ... this shape while still making use of the standard undo.
-
- Using a hierarchical menu would solve the issue of adding many things to the
- Edit menu. On the other hand, reprsenting the commands graphically might be
- the best of all. That way you can represent the dependencies between commands.
-
- The difference in these approaches is that a linear undo/redo simply brings the
- user back to a previous document state. A non-linear approach allows the user
- to reach new document states by rearranging the operations. The US&R paper
- talks about how the system resolved conflicts and ambiguities.
-
- Larry
-
-
-